package TransactionImplementation

import (
	"SPC/AbstractTransactions"
	"SPC/Model"
	"SPC/ModelImplementation"
)

type ChangeDirectTransaction struct {
	AbstractTransactions.ChangeMethodTransaction
	itsBank    string
	itsAccount string
}

func NewChangeDirectTransaction(empid int, bank string, account string) *ChangeDirectTransaction{
	n := &ChangeDirectTransaction{
		*AbstractTransactions.NewChangeMethodTransaction(empid),
		bank,
		account,
	}
	n.ChangeMethodTransaction.GetMethod = n.GetMethod
	return n
}

func (c *ChangeDirectTransaction)GetMethod()Model.PaymentMethod{
	return ModelImplementation.NewDirectMethod(c.itsBank,c.itsAccount)
}